{extend name="template/base" /}
{block name="content"}
<div class="page-container">
    <div class="cl pd-5 bg-1 bk-gray">
        <span class="l">
        </span>
        <span class="r pt-5 pr-5">
            共有数据 ：<strong>{$count ?? '0'}</strong> 条
        </span>
    </div>
    {php} use think\Db;{/php}
    <table class="table table-border table-bordered table-hover table-bg mt-20">
        <thead>
        <tr class="text-c">
            <th width="">ID</th>
            <th width="">酒店ID</th>
            <th width="">酒店名称</th>
            <th width="">酒店房型</th>
            <th width="">酒店房价</th>
            <th width="">房间使用量</th>
            <th width="">总价格</th>
        </tr>
        </thead>
        <tbody>
        {volist name="vo" id="vo"}
        <tr class="text-c">
            <td>{$vo.settlement_id}</td>
            <td>{$vo.hotel_id}</td>
            <td>
                <!--查找酒店名称-->
                {if !empty($vo['hotel_id'])}
                <?php
                    echo Db::name('hotel')->where('id',$vo['hotel_id'])->value('hotel_name');
                ?>

                {/if}
            </td>
            <td>{$vo.room_name}</td>
            <td>{$vo.price}</td>
            <td>{$vo.num}</td>
            <td>{php} echo $vo['num'] * $vo['price']; {/php}</td>
        </tr>
        {/volist}
        </tbody>
    </table>
</div>
{/block}

{block name='script'}
<script type="text/javascript" src="__LIB__/My97DatePicker/WdatePicker.js"></script>
{/block}

